package LeetCode.leetcode226;

public class Review2 {
    public TreeNode invertTree(TreeNode root) {
        if (root == null) return null;
        TreeNode tempNode = root.right;
        root.right = root.left;
        root.left = tempNode;
        invertTree(root.left);
        invertTree(root.right);
        return  root;
    }
}
